package com.example.Controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.dao.TimeMapper;
import com.example.pojo.Time;
import com.example.util.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/time")
@Api(tags = "时间规定管理")
public class TimeController {
    @Autowired
    private TimeMapper timeMapper;



    @RequestMapping("/selectSelfDe")  //查询默认
    public Result selectSelfDe(){
        QueryWrapper<Time> wrapper = new QueryWrapper<>();
        Integer id = 1;
        wrapper.eq("id",id);
        Time time = timeMapper.selectOne(wrapper);
        return new Result("200","查询成功",time);
    }

}
